1. Field of the Invention
The present invention relates to a communication control program, and in particular, to a basic technique for data communication control utilizing a communication network such as the Internet; that is, a communication control program for performing data transfer processing in relation to communication control. Further, the present invention relates to a recording medium carrying the same, and to a communication control method and a data processing apparatus used for performing data transfer processing in relation to communication control.
Data communication products utilizing the Internet and other communication networks are expected to be provided continuously in various forms. The present invention is applied to fundamental products for data communications, such as a data communication control system, which are provided, for example, as a part of an operating system.
2. Description of the Related Art
A data communication control program performs hierarchical control. That is, at each of a plurality of layers a control means performs processing, and upon completion of the processing, the control is transferred to the control means of an adjacent layer. FIG. 12 is an explanatory diagram showing conventional data communication control. FIG. 12 shows an example configuration of a data processing apparatus 90 which performs hierarchical data communication control in three layers. The data processing apparatus 90 includes an application program 96, a first-layer control means 91, a second-layer control means 92, a third-layer control means 93, and a dispatch control means 94.
For example, when the application program 96 performs data transmission, each of the first-layer control means 91, the second-layer control means 92, and the third-layer control means 93 performs peculiar processing for the data transmission (connection). Specifically, the first-layer control means 91 receives data successively from the application program 96, performs processing to be performed at the first layer, and transmits the processed data to the second-layer control means 92, while designating the second layer as a destination. For the data received from the first-layer control means 91, the second-layer control means 92 performs processing to be performed at the second layer, and transmits the processed data to the third-layer control means 93, while designating the third layer as a destination. For the received data, the third-layer control means 93 performs processing to be performed at the third layer, and transmits the processed data to a communication control apparatus 97.
When the first-layer control means 91, the second-layer control means 92, and the third-layer control means 93 receive a completion message from the communication control apparatus 97, the third-layer control means 93, the second-layer control means 92, and the first-layer control means 91 successively perform their hierarchical controls, in this sequence, and the first-layer control means 91 for the highest layer sends to the application program 96 a message indicating normal completion or anomalous completion.
Specifically, the third-layer control means 93 receives data of a completion message from the communication control apparatus 97, performs processing of the third layer, and transfers the data to the dispatch control means 94, while designating the second-layer control means 92 as a destination of the completion-message data.
The dispatch control means 94 performs processing as shown in FIG. 13. When the dispatch control means 94 receives data from the third-layer control means 93 (step S90), the dispatch control means 94 detects an entry of the second-layer control means 92 on the basis of destination information of a data transfer control table 95 (step S91). When the entry of the second-layer control means 92 is not empty (step S92), the dispatch control means 94 queues the data to the entry (step S93), and transfers the data to the second-layer control means 92 in such manner that the leading data in the queue are transferred first (step S94). When the entry for the second-layer control means 92 is empty (step S92), the dispatch control means 94 transfers the received data to the second-layer control means 92 (step S95).
The second-layer control means 92 performs the processing of the second layer in a flow similar to that described above, and transfers the data to the first-layer control means 91. The first-layer control means 91 receives the data from the second-layer control means 92, performs the processing of the first layer, and transfers the data to the application program 96 in response to a request therefrom.
The data processing apparatus 90 performs similar processing when the data processing apparatus 90 receives from the communication control apparatus 97 data of an anomalous-completion message. Irrespective of whether the message indicates normal or anomalous completion, the dispatch control means 94 transfers the data to the first-layer control means 91, the second-layer control means 92, and the third-layer control means 93 successively on the basis of destination information. Therefore, each of the first-layer control means 91, the second-layer control means 92, and the third-layer control means 93 processes the received data at the corresponding hierarchical layer, and, only after having detected the message of an anomalous completion, discards the data under control which are entered in the respective connection management control table (not shown) and reports the anomalous completion to the upper layer.
FIG. 14 shows processing which is performed when the communication control apparatus 97 sends to the data processing apparatus 90 a message indicating occurrence of an anomalous event. The third-layer control means 93 receives data from the communication control apparatus 97 (step 100) and performs processing (step 101). When the third-layer control means 93 detects occurrence of an anomalous event (step 102), the third-layer control means 93 discards the data (step 103), and inserts an anomaly indication in data to be transmitted to the second-layer control means 92 (step 104).
Upon receipt of data from the third-layer control means 93 (step 105), the dispatch control means 94 transfers the data to the second-layer control means 92 on the basis of the data transfer control table 95 (step 106).
The second-layer control means 92 receives data from the dispatch control means 94 (step 107). When the second-layer control means 92 detects the anomalously indication (step 108) the second-layer control means 92 discards the data (step 109) and inserts an anomaly indication in data to be transmitted to the first-layer control means 91 (step 110).
Upon receipt of data from the second-layer control means 92 (step 111), the dispatch control means 94 transfers the data to the first-layer control means 91 on the basis of the data transfer control table 95 (step 112).
The first-layer control means 91 receives data from the dispatch control means 94 (step 113). When the first-layer control means 91 detects the anomalously indication (step 114), the first-layer control means 91 discards the data (step 115), and reports the occurrence of an anomalous event to the application program 96 (step 116).
In the conventional data communication control, data are processed by the control means of each layer, and resultant data are transferred to the control means of the next layer. When an anomalous event occurs during such data processing, waiting processing is performed, so that the data communication (connection) does not end until the end of data discard at the control means at the respective layers. Therefore, a new data communication to be performed by use of the same environment is placed in a wait status.
The conventional data communication control program performs hierarchical control in such a manner that data are processed by the control means of each layer and the processed data are transferred to the next layer. Therefore, even when an anomalous event occurs, a single communication does not end completely, unless the occurrence of an anomalous event is reported sequentially to all the layers for allowing the control means of the respective layers to perform processing for coping with the anomalous event. Accordingly, until the communication ends completely, a new communication to be performed by use of the same environment cannot be started.
Moreover, as to data communications having the same connection ID, reliability is considered to decrease as a result of the unstable communication environment.
Since exchange of data is performed a plurality of times in a single connection, when an anomalous event occurs in the course of the communication, some of the data exchanged in the connection have already been transferred to the upper layer. Therefore, when an anomalous event occurs, all the data, including the data having already been transferred to the upper layer, must be discarded so as to enable acceptance of a new event.
A specific example of data communications will now be described. In a banking system, the database of a host is not updated each time transaction data (deposit, withdrawal, transfer) to be recorded are produced at a terminal, such as an ATM. Instead, such transaction data are stored in, for example, a means server during the daytime, and are transferred to the database of the host, through communication with the host, during the nighttime. In an example case in which a host of a bank A communicates with hosts of banks B and C, the host of bank A sets different connections for the hosts of banks B and C, respectively, and communicates therewith in order to exchange the transaction data between the hosts. Such data transfer cannot be performed during the daytime, and therefore is performed at night in a collective manner. Therefore, when an error occurs in data communication control, quick recovery is required.
However, the conventional data communication control scheme in which the control means of each layer awaits completion of processing of the previous layer is of low efficiency. Further, unless data discard is completed, a new event cannot be accepted, and therefore communications suffer delay.